<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<link rel="stylesheet" href="${staticServer}/inc/style/main.css" />
<link rel="stylesheet" href="${staticServer}/inc/style/page.css" />
<link rel="stylesheet" href="${staticServer}/css/struct_info.css" />
<script src="${staticServer}/inc/js/jquery.js"></script>
<script src="${staticServer}/inc/js/pageset.js"></script>
<script src="${staticServer}/inc/js/submitter.js"></script>
<script src="${staticServer}/inc/js/infopad.js?2.2"></script>
<script type="text/javascript" src="${staticServer}/common/uploadify/jquery.uploadify.js"></script>
<script type="text/javascript" src="${staticServer}/js/web/uploadImg.js?1.5"></script>
<link rel="stylesheet" href="${staticServer}/css/consultant_client.css" />
	
<link rel="stylesheet" href="${staticServer}/inc/style/date/datepicker.css" />
<script src="${staticServer}/inc/js/datepicker.js"></script>

<style>
#SWFUpload_0{
	margin-top: 70px;
    margin-left: -30px;
}
</style>
<script>
var contextPath='${contextPath}';
var _contextPath = '${staticServer}';

var add_Period1 = function(){
	var id = $("#idid").val();
	var type = $("#type").val();
	var rent_Infor_id = $("#rent_Infor_id").val();
	var handler = $("#handler").val();
	var dateofdeposit = $("#dateofdeposit").val();
	var maturitydate = $("#maturitydate").val();
	var rent = $("#rent").val();
	var duedate=$("#duedate").val();
	var accountHolder=$("#accountHolder").val();
	var bank = $("#bank").val();
	var accountNumber = $("#accountNumber").val();
	var rent_Infor_id = $("#rent_Infor_id").val();
	var paymentcycle = $("#paymentcycle").val();
	if(handler==""){
		infopad.err("请输入申请人");
		return;
	}
	if(maturitydate==""){
		infopad.err("请输入合约到期时间");
		return;
	}
	if(rent==""){
		infopad.err("请输入租金");
		return;
	}
	if(accountHolder==""){
		infopad.err("请输入持卡人");
		return;
	}
	$.post("${contextPath}/rent/rent_add.json", {
		    "id":id,
		    "rent_Infor_id":rent_Infor_id,
		    "handler":handler,
		     "type":type,
			"dateofdeposit":dateofdeposit,
			"maturitydate":maturitydate,
			"rent":rent,
			"duedate":duedate,
			"accountHolder":accountHolder,
			"accountNumber":accountNumber,
			"paymentcycle":paymentcycle,
			"bank":bank
		}, function(ms) {
		   var msg = ms.msg;
		   if(msg!=null && msg=="1"){
			   infopad.msg("操作成功！");
			   window.location.href="${contextPath}/rent/rentInforList.htm";
		   }
			
	});
}



</script>
</head>
<input type="hidden" id="idid" value="<#if rent??&&rent.id??>${rent.id}</#if>">
<input type="hidden" id="rent_Infor_id" value="<#if rent??>${rent.rent_Infor_id}</#if>">
<input type="hidden" id="type" value="<#if type??>${type}</#if>">
<body>
	<div id="home_link">
		<ul>
			<li></li>
			<li>&gt;</li>
			<li>组织架构</li>
			<li>&gt;</li>
			<li class="current">title</li>
		</ul>
	</div>

	<div id="container">
		<div id="title">添加房租</div>
		<table id="infotable">
			
			<tr>
				<th>申请人</th>
				<td>
					<input type="text" id="handler"  value="<#if rent??>${rent.handler}</#if>" size="14" maxlength="15" >
				</td>
			</tr>
			<tr>
				<th>支付日期:</th>
				<td>
					<input type="text" id="dateofdeposit" placeholder="支付日期" value="<#if rent??>${rent.dateofdeposit}</#if>" rel="DATE::Y-m-d" value="" size="14" maxlength="15" readonly="readonly" class="DatePicker_Icon">
				</td>
			</tr>
				<tr>
				<th>合约到期日期:</th>
				<td>
					<input type="text" id="duedate" placeholder="支付日期" value="<#if rent??>${rent.duedate}</#if>" rel="DATE::Y-m-d" value="" size="14" maxlength="15" readonly="readonly" class="DatePicker_Icon">
				</td>
			</tr>
			<tr>
				<th>房租到期日期:</th>
				<td>
					<input type="text" id="maturitydate" placeholder="房租到期日期" value="<#if rent??>${rent.maturitydate}</#if>" rel="DATE::Y-m-d" value="" size="14" maxlength="15" readonly="readonly" class="DatePicker_Icon">
				</td>
			</tr>
			<tr>
				<th>租金：</th>
				<td>
					<input type="text" id="rent"  value="<#if rent??>${rent.rent}</#if>" size="14" maxlength="15" >
				</td>
			</tr>
				<tr>
				<th>支付周期：</th>
				<td>
					<input type="text" id="paymentcycle"  value="<#if rent??>${rent.paymentcycle}</#if>" size="14" maxlength="15" >
				</td>
			</tr>
				<tr>
				<th>收款人：</th>
				<td>
					<input type="text" id="accountHolder"  value="<#if rent??>${rent.accountHolder}</#if>" size="14" maxlength="15" >
				</td>
			</tr>
			
				
			
				<tr>
				<th>银行卡号：</th>
				<td>
					<input type="text" id="accountNumber" value="<#if rent??>${rent.accountNumber}</#if>" size="14" maxlength="15" >
				</td>
			</tr>
				<tr>
				<th>持卡银行：</th>
				<td>
					<input type="text" id="bank" value="<#if rent??>${rent.bank}</#if>" size="14" maxlength="15" >
				</td>
			</tr>
		
			
			
		</table>
		
		<div id="controlbar">
			<input type="button" class="submit" onclick="add_Period1()" value="  保  存  " />
		</div>
	</div>
	
</body>
</html>